#pragma once
#include <pthread.h>

class LockGuard
{
public:
    LockGuard()
    {
        pthread_mutex_init(&_mutex, nullptr);
    }
    ~LockGuard()
    {
        pthread_mutex_destroy(&_mutex);
    }

private:
    pthread_mutex_t _mutex;
};